<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="cms" uri="http://cms.gxsoft.com/tags-cms"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用人单位信息管理--更新</title>
<link href="<%=request.getContextPath()%>/css/reset.css" rel="stylesheet" type="text/css"/>
<link href="<%=request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript">
	function check(){
		var frm = document.form1;
		if(frm.empInfoName.value == ""){
			alert("请输入单位名称！");
			frm.empInfoName.focus();
			return false;
		}
		if(frm.empInfoShopCard.value == ""){
			alert("请输入营业执照号！");
			frm.empInfoShopCard.focus();
			return false;
		}
		if(frm.empInfoLandtaxRegisOrgan.value == ""){
			alert("请输入地税注册机关！");
			frm.empInfoLandtaxRegisOrgan.focus();
			return false;
		}
		if(frm.empInfoUnitType.value == ""){
			alert("请选择单位类型！");
			return false;
		}
		if(frm.empInfoIndustry.value == ""){
			alert("请选择所属行业！");
			return false;
		}
		if(frm.empInfoPlaceOrgan.value == ""){
			alert("请选择所属社区、县局！");
			return false;
		}
		if(frm.empInfoBusinessRegisOrgan.value == ""){
			alert("请输入工商（法人）注册机关！");
			frm.empInfoBusinessRegisOrgan.focus();
			return false;
		}
		if(frm.empInfoTownWorkNum.value!="" || frm.empInfoCountryWorkNum.value!="" || frm.empInfoManNum.value!="" || 
		frm.empInfoWomanNum.value!="" || frm.empInfoContractedNum.value!="" || frm.empInfoNcontractedNum.value!="" ||
		frm.empInfoGoonContractNum.value!="" || frm.empInfoEmpInjInsNum.value!="" || frm.empInfoEndowmentInsNum.value!="" ||
		frm.empInfoMedicalInsNum.value!="" || frm.empInfoUnempInsNum.value!="" || frm.empInfoMaterityInsNum.value!="" ||
		frm.empInfoNoInsNum.value!=""){
		if(frm.empInfoAllWorkNum.value == "")
			{
				alert("员工总人数不能为空！");
				frm.empInfoAllWorkNum.focus();
				return false;
			}
		}
		if(isNaN(frm.empInfoAllWorkNum.value )){
			alert("员工总人数应为数字！");
			frm.empInfoAllWorkNum.focus();
			return false;
		}
		if(isNaN(frm.empInfoTownWorkNum.value )){
			alert("城镇职工人数应为数字！");
			frm.empInfoTownWorkNum.focus();
			return false;
		}
		
		if(isNaN(frm.empInfoCountryWorkNum.value )){
			alert("农民工人数应为数字！");
			frm.empInfoCountryWorkNum.focus();
			return false;
		}
		
		if(frm.empInfoTownWorkNum.value!="" && frm.empInfoCountryWorkNum.value==""){
			if(parseInt(frm.empInfoAllWorkNum.value)<parseInt(frm.empInfoTownWorkNum.value)+0){
		
			alert("员工总人数应大于等于城镇职工人数与农民工人数的总和！");
			frm.empInfoAllWorkNum.focus();
			return false;
			}
		}
		
		if(frm.empInfoTownWorkNum.value=="" && frm.empInfoCountryWorkNum.value!=""){
			if(parseInt(frm.empInfoAllWorkNum.value)<parseInt(frm.empInfoCountryWorkNum.value)+0){
				alert("员工总人数应大于等于城镇职工人数与农民工人数的总和！");
				frm.empInfoAllWorkNum.focus();
				return false;
			}
		}

		if(frm.empInfoTownWorkNum.value!="" && frm.empInfoCountryWorkNum.value!=""){
			if(parseInt(frm.empInfoAllWorkNum.value)<parseInt(frm.empInfoTownWorkNum.value)+parseInt(frm.empInfoCountryWorkNum.value)){
				alert("员工总人数应大于等于城镇职工人数与农民工人数的总和！");
				frm.empInfoAllWorkNum.focus();
				return false;
			}
		}
		
		if(isNaN(frm.empInfoManNum.value )){
			alert("男职工人数应为数字！");
			frm.empInfoManNum.focus();
			return false;
		}
		if(isNaN(frm.empInfoWomanNum.value )){
			alert("女职工人数应为数字！");
			frm.empInfoWomanNum.focus();
			return false;
		}
			if(frm.empInfoManNum.value !="" && frm.empInfoWomanNum.value !=""){
				if(parseInt(frm.empInfoAllWorkNum.value)<parseInt(frm.empInfoManNum.value)+parseInt(frm.empInfoWomanNum.value)){
					alert("员工总人数应大于等于男职工人数与女职工人数的总和！");
					frm.empInfoAllWorkNum.focus();
					return false;
				}
		}
		if(frm.empInfoManNum.value !="" && frm.empInfoWomanNum.value ==""){
			if(parseInt(frm.empInfoAllWorkNum.value)<parseInt(frm.empInfoManNum.value)+0){
				alert("员工总人数应大于等于男职工人数与女职工人数的总和！");
				frm.empInfoAllWorkNum.focus();
				return false;
			}
		}
		if(frm.empInfoManNum.value =="" && frm.empInfoWomanNum.value !=""){
			if(parseInt(frm.empInfoAllWorkNum.value)<parseInt(frm.empInfoWomanNum.value )+0){
				alert("员工总人数应大于等于男职工人数与女职工人数的总和！");
				frm.empInfoAllWorkNum.focus();
				return false;
			}
		}
		
		if(isNaN(frm.empInfoContractedNum.value )){
			alert("已签订合同人数应为数字！");
			frm.empInfoContractedNum.focus();
			return false;
		}
		if(isNaN(frm.empInfoNcontractedNum.value )){
			alert("未签订合同人数应为数字！");
			frm.empInfoNcontractedNum.focus();
			return false;
		}
		if(frm.empInfoContractedNum.value !="" && frm.empInfoNcontractedNum.value !=""){
			if(parseInt(frm.empInfoAllWorkNum.value)<parseInt(frm.empInfoContractedNum.value)+parseInt(frm.empInfoNcontractedNum.value)){
				alert("员工总人数应大于等于已签订合同人数与未签订合同人数的总和！");
				frm.empInfoAllWorkNum.focus();
				return false;
			}
		}
		if(frm.empInfoContractedNum.value !="" && frm.empInfoNcontractedNum.value ==""){
			if(parseInt(frm.empInfoAllWorkNum.value)<parseInt(frm.empInfoContractedNum.value)+0){
				alert("员工总人数应大于等于已签订合同人数与未签订合同人数的总和！");
				frm.empInfoAllWorkNum.focus();
				return false;
			}
		}
		if(frm.empInfoContractedNum.value =="" && frm.empInfoNcontractedNum.value !=""){
			if(parseInt(frm.empInfoAllWorkNum.value)<parseInt(frm.empInfoNcontractedNum.value)+0){
				alert("员工总人数应大于等于已签订合同人数与未签订合同人数的总和！");
				frm.empInfoAllWorkNum.focus();
				return false;
			}
		}
		if(isNaN(frm.empInfoGoonContractNum.value )){
			alert("当年续签合同人数应为数字！");
			frm.empInfoGoonContractNum.focus();
			return false;

		}
		if(frm.empInfoGoonContractNum.value!=""){
			if(parseInt(frm.empInfoAllWorkNum.value)<parseInt(frm.empInfoGoonContractNum.value)){
				alert("员工总人数应大于等于当年续签合同人数！");
				frm.empInfoAllWorkNum.focus();
				return false;
			}
		}
		if(isNaN(frm.empInfoEmpInjInsNum.value )){
			alert("参加工伤保险人数应为数字！");
			frm.empInfoEmpInjInsNum.focus();
			return false;
			
		}
		if(frm.empInfoEmpInjInsNum.value!=""){
			if(parseInt(frm.empInfoAllWorkNum.value)<parseInt(frm.empInfoEmpInjInsNum.value)){
				alert("员工总人数应大于等于参加工伤保险人数！");
				frm.empInfoAllWorkNum.focus();
				return false;
			}
		}
		if(isNaN(frm.empInfoEndowmentInsNum.value )){
			alert("参加养老保险人数应为数字！");
			frm.empInfoEndowmentInsNum.focus();
			return false;
			
		}
			if(frm.empInfoEndowmentInsNum.value!=""){
				if(parseInt(frm.empInfoAllWorkNum.value)<parseInt(frm.empInfoEndowmentInsNum.value)){
					alert("员工总人数应大于等于参加养老保险人数！");
					frm.empInfoAllWorkNum.focus();
					return false;
				}
		}
		if(isNaN(frm.empInfoMedicalInsNum.value )){
			alert("参加医疗保险人数应为数字！");
			frm.empInfoMedicalInsNum.focus();
			return false;
			
		}
		if(frm.empInfoMedicalInsNum.value!=""){
			if(parseInt(frm.empInfoAllWorkNum.value)<parseInt(frm.empInfoMedicalInsNum.value)){
				alert("员工总人数应大于等于参加医疗保险人数！");
				frm.empInfoAllWorkNum.focus();
				return false;
				}
		}
		if(isNaN(frm.empInfoUnempInsNum.value )){
			alert("参加失业保险人数应为数字！");
			frm.empInfoUnempInsNum.focus();
			return false;
			
		}
		if(frm.empInfoUnempInsNum.value!=""){
			if(parseInt(frm.empInfoAllWorkNum.value)<parseInt(frm.empInfoUnempInsNum.value)){
				alert("员工总人数应大于等于参加失业保险人数！");
				frm.empInfoAllWorkNum.focus();
				return false;
				}
		}
		if(isNaN(frm.empInfoMaterityInsNum.value )){
			alert("参加生育保险人数请输入数字数！");
			frm.empInfoMaterityInsNum.focus();
			return false;
			
		}
		if(frm.empInfoMaterityInsNum.value!=""){
		if(parseInt(frm.empInfoAllWorkNum.value)<parseInt(frm.empInfoMaterityInsNum.value)){
			alert("员工总人数应大于等于参加生育保险人数！");
			frm.empInfoAllWorkNum.focus();
			return false;
			}
		}
		if(isNaN(frm.empInfoNoInsNum.value )){
			alert("未参保人数应为数字！");
			frm.empInfoNoInsNum.focus();
			return false;
		}
		if(frm.empInfoNoInsNum.value!=""){
			if(parseInt(frm.empInfoAllWorkNum.value)<parseInt(frm.empInfoNoInsNum.value)){
				alert("员工总人数应大于等于未参保人数！");
				frm.empInfoAllWorkNum.focus();
				return false;
				}
			}
	}
</script>
</head>
<body>
<form name="form1" action="<%=request.getContextPath()%>/unitinfo.do?method=update&eid=${eInfo.empInfoId}" method="post" onsubmit="return check()">
<p style="height:25px; line-height:25px; background:#FCFCDF; padding-left:10px; font-weight:bold;color:#EF7726;border:1px #eee solid;border-width:1px 0; text-align:center;">申报人必须对所填写的内容负责！</p>
<table width="100%">
    <tr>
    <td align="right" class="bg_blue"><p><font color="red">*</font>&nbsp;&nbsp;单位名称：</p>
    </td>
    <td  align="left" ><input type="text" name="empInfoName" value="${eInfo.empInfoName}" maxlength="100">&nbsp;</td>
    <td  align="right" class="bg_blue"><p>组织机构代码：</p>
    </td>
    <td  align="left" ><input type="text" name="empInfoCode" value="${eInfo.empInfoCode}" maxlength="100">&nbsp;</td>
  </tr>
  <tr>
    <td class="bg_blue" align="right"><p><font color="red">*</font>&nbsp;&nbsp;营业执照号：</p>
    </td>
    <td align="left" ><input type="text" name="empInfoShopCard" value="${eInfo.empInfoShopCard}" maxlength="50">&nbsp;</td>
    <td class="bg_blue" align="right"><p><font color="red">*</font>&nbsp;&nbsp;地税注册机关：</p>
    </td>
    <td align="left" ><input type="text" name="empInfoLandtaxRegisOrgan" value="${eInfo.empInfoLandtaxRegisOrgan}" maxlength="50">&nbsp;</td>
  </tr>
  <tr>
  	<td class="bg_blue" align="right"><p><font color="red">*</font>&nbsp;&nbsp;单位类型：</p>
    </td>
    <td align="left" >
    <cms:selectAll dataType="001" name="empInfoUnitType" firstTitle="请选择.." key="${eInfo.empInfoUnitType}"></cms:selectAll>
    </td>
    <td class="bg_blue" align="right"> 银行帐户 ：</td>
    <td align="left" ><input type="text" name="empInfoBankAccount" value="${eInfo.empInfoBankAccount}" maxlength="50">&nbsp;</td>
  </tr>
  <tr>
    <td class="bg_blue" align="right"><p><font color="red">*</font>&nbsp;&nbsp;所属行业：</p>
    </td>
    <td align="left" >
    <cms:selectAll dataType="009" name="empInfoIndustry" firstTitle="请选择.." key="${eInfo.empInfoIndustry}"></cms:selectAll>
    </td>
     <td class="bg_blue" align="right"><p>开户银行：</p>
    </td>
    <td align="left" ><input type="text" name="empInfoBankOfDeposit" value="${eInfo.empInfoBankOfDeposit}" maxlength="50">&nbsp;</td>
  </tr>
  <tr>
    <td class="bg_blue"align="right"><p><font color="red">*</font>&nbsp;&nbsp;所属社区、县局：</p>
    </td>
    <td align="left"><cms:selectAll dataType="002" name="empInfoPlaceOrgan" firstTitle="请选择.." key="${eInfo.empInfoPlaceOrgan}"></cms:selectAll></td>
    <td class="bg_blue" align="right"><p><font color="red">*</font>&nbsp;&nbsp;工商（法人）注册机关：</p>
    </td>
    <td align="left" ><input type="text" name="empInfoBusinessRegisOrgan" value="${eInfo.empInfoBusinessRegisOrgan}" maxlength="50">&nbsp;</td>
  </tr>
  <tr>
    <td class="bg_blue"align="right">单位地址：</td>
    <td align="left"><input type="text" name="empInfoPlaceAddress" value="${eInfo.empInfoPlaceAddress}" maxlength="100"></td>
    <td class="bg_blue"align="right"> 法人代表：</td>
    <td align="left"><input type="text" name="empInfoCorporateRepresent" value="${eInfo.empInfoCorporateRepresent}" maxlength="20"></td>
  </tr>
  <tr>
    <td class="bg_blue"align="right"> 法人身份证号：</td>
    <td align="left"><input type="text" name="empInfoRepresentIdNum" value="${eInfo.empInfoRepresentIdNum}" maxlength="20"></td>
    <td class="bg_blue"align="right">法人移动电话：</td>
    <td align="left"><input type="text" name="empInfoCellPhone" value="${eInfo.empInfoCellPhone}" maxlength="16"></td>
  </tr>
  <tr>
    <td class="bg_blue" align="right">法人联系电话：</td>
    <td align="left"><input type="text" name="empInfoTelphone" value="${eInfo.empInfoTelphone}" maxlength="16"></td>
    <td class="bg_blue" align="right"><p>劳资负责人：</p>
    </td>
    <td align="left"><input type="text" name="empInfoLabManaPrincipal" value="${eInfo.empInfoLabManaPrincipal}" maxlength="20"/></td>
  </tr>
  <tr>
    <td class="bg_blue" align="right">负责人移动电话：</td>
    <td align="left"><input type="text" name="empInfoCellPhone1" value="${eInfo.empInfoCellPhone1}" maxlength="16"/></td>
    <td class="bg_blue" align="right"> <p>负责人联系电话：</p>
    </td>
    <td align="left"><input type="text" name="empInfoTelphone1" value="${eInfo.empInfoTelphone1}" maxlength="16"></td>
  </tr>
  <tr>
    <td class="bg_blue" align="right"> <p>工时制度：</p>
    </td>
    <td align="left"><input type="text" name="empInfoManHourRegu" value="${eInfo.empInfoManHourRegu}" maxlength="20"/></td>
    <td class="bg_blue" align="right">最低工资标准：</td>
    <td align="left"><input type="text" name="empInfoLowsalaLevel" value="${eInfo.empInfoLowsalaLevel}" maxlength="20"></td>
   <tr>
    <td class="bg_blue" align="right">城镇职工人数：</td>
    <td align="left"><input type="text" name="empInfoTownWorkNum" value="${eInfo.empInfoTownWorkNum}" maxlength="10"></td>
    <td class="bg_blue" align="right">农民工人数：</td>
    <td align="left"><input type="text" name="empInfoCountryWorkNum" value="${eInfo.empInfoCountryWorkNum}" maxlength="10"></td>
  </tr>
  <tr>
    <td class="bg_blue" align="right">男职工人数：</td>
    <td align="left"><input type="text" name="empInfoManNum" value="${eInfo.empInfoManNum}" maxlength="10"></td>
    <td class="bg_blue" align="right">女职工人数：</td>
    <td align="left"><input type="text" name="empInfoWomanNum" value="${eInfo.empInfoWomanNum}" maxlength="10"></td>
  </tr>
  <tr>
    <td class="bg_blue" align="right">已签定合同人数：</td>
    <td align="left"><input type="text" name="empInfoContractedNum" value="${eInfo.empInfoContractedNum}" maxlength="10"></td>
    <td class="bg_blue" align="right">未签定合同人数：</td>
    <td align="left"><input type="text" name="empInfoNcontractedNum" value="${eInfo.empInfoNcontractedNum}" maxlength="10"></td>
  </tr>
  <tr>
    <td class="bg_blue" align="right">当年续签合同人数：</td>
    <td align="left"><input type="text" name="empInfoGoonContractNum" value="${eInfo.empInfoGoonContractNum}" maxlength="10"></td>
    <td class="bg_blue" align="right">参加工伤保险人数：</td>
    <td align="left"><input type="text" name="empInfoEmpInjInsNum" value="${eInfo.empInfoEmpInjInsNum}" maxlength="10"></td>
  </tr>
  <tr>
    <td class="bg_blue" align="right">参加养老保险人数：</td>
    <td align="left"><input type="text" name="empInfoEndowmentInsNum" value="${eInfo.empInfoEndowmentInsNum}" maxlength="10"></td>
    <td class="bg_blue" align="right">参加医疗保险人数：</td>
    <td align="left"><input type="text" name="empInfoMedicalInsNum" value="${eInfo.empInfoMedicalInsNum}" maxlength="10"></td>
  </tr>
  <tr>
    <td class="bg_blue" align="right">参加失业保险人数：</td>
    <td align="left"><input type="text" name="empInfoUnempInsNum" value="${eInfo.empInfoUnempInsNum}" maxlength="10"></td>
    <td class="bg_blue" align="right">参加生育保险人数：</td>
    <td align="left"><input type="text" name="empInfoMaterityInsNum" value="${eInfo.empInfoMaterityInsNum}" maxlength="10"></td>
  </tr>
  <tr>
    <td class="bg_blue" align="right">未参保人数：</td>
    <td align="left"><input type="text" name="empInfoNoInsNum" value="${eInfo.empInfoNoInsNum}" maxlength="10"></td>
    <td class="bg_blue" align="right">员工总人数：</td>
    <td align="left"><input type="text" name="empInfoAllWorkNum" value="${eInfo.empInfoAllWorkNum}" maxlength="10"></td>
  </tr>
  <tr>
    <td class="bg_blue" align="right">是否成立劳动争议调解组：</td>
    <td align="left"><select name="empInfoIfOrgDealDisputed"><option value="0" <c:if test="${eInfo.empInfoIfOrgDealDisputed == '0'}">selected</c:if>>是</option><option value="1" <c:if test="${eInfo.empInfoIfOrgDealDisputed == '1'}">selected</c:if>>否</option></select></td>
    <td class="bg_blue" align="right">是否签订集体合同：</td>
    <td align="left"><select name="empInfoIfContract"><option value="0" <c:if test="${eInfo.empInfoIfContract == '0'}">selected</c:if>>是</option><option value="1" <c:if test="${eInfo.empInfoIfContract == '1'}">selected</c:if>>否</option></select></td>
  </tr>
  <tr>
    <td class="bg_blue" align="right">营业执照上传：</td>
    <td align="left" colspan="3"><iframe name="upload1" src="<%=request.getContextPath()%>/admin/employerShopUpload.jsp" frameBorder="0" width="400" height="25" scrolling="no"></iframe>
    <br/>支持格式:.jpg;.gif<br/><span id="shopFileName">
    <c:if test="${!empty eInfo.empInfoShopUrl}"><font color="#FF0000">${eInfo.empInfoShopUrl}</font></c:if>
    </span>
    <input type="hidden" name="empInfoShopUrl" value="${eInfo.empInfoShopUrl}">
    </td>
  </tr>
  <tr>
    <td class="bg_blue" align="right">税务登记证上传：</td>
    <td align="left" colspan="3"><iframe name="upload2" src="<%=request.getContextPath()%>/admin/employerLandtaxUpload.jsp" frameBorder="0" width="400" height="25" scrolling="no"></iframe>
    <br/>支持格式:.jpg;.gif<br/><span id="landtaxFileName">
    <c:if test="${!empty eInfo.empInfoLandtaxUrl}"><font color="#FF0000">${eInfo.empInfoLandtaxUrl}</font></c:if>
    </span>
    <input type="hidden" name="empInfoLandtaxUrl" value="${eInfo.empInfoLandtaxUrl}">
    </td>
  </tr>
  <tr>
    <td class="nohover" colspan="4" align="center"><input class="buttonsubmit" type="submit" value="提交">&nbsp;<input class="buttonreset" type="reset" value="重置"> <input class="buttonreturn" type="button" value="返回" onClick="history.go(-1)"></td>
  </tr>
</table>
</form>
</body>
</html>

